// 用户类型定义
export interface User {
  id: string;
  username: string;
  realName?: string;
  avatar?: string;
  email?: string;
  phone?: string;
  role: Role;
  status: 'active' | 'inactive' | 'locked';
  permissions: string[];
  createdAt: string;
  lastLogin?: string;
}

// 角色类型定义
export interface Role {
  id: string;
  name: string;
  description?: string;
  permissions: Permission[];
  createdAt: string;
  updatedAt: string;
}

// 权限类型定义
export interface Permission {
  id: string;
  code: string;
  name: string;
  type: 'menu' | 'operation' | 'data';
  parentId?: string;
  path?: string;
  component?: string;
  redirect?: string;
  icon?: string;
  sort?: number;
  hidden?: boolean;
  status: 'active' | 'inactive';
  children?: Permission[];
}

// 公告类型定义
export interface Announcement {
  id: string;
  title: string;
  content: string;
  publisher: string;
  publishTime: string;
  expireTime?: string;
  status: 'draft' | 'published' | 'expired';
  important: boolean;
  type: 'system' | 'activity' | 'notice';
  readCount: number;
  createdAt: string;
  updatedAt: string;
}

// 帮助中心类型定义
export interface HelpItem {
  id: string;
  title: string;
  content: string;
  category: 'faq' | 'guide' | 'doc';
  tags: string[];
  viewCount: number;
  status: 'active' | 'inactive';
  createdAt: string;
  updatedAt: string;
}

// 轮播图类型定义
export interface Carousel {
  id: string;
  title: string;
  imageUrl: string;
  linkUrl?: string;
  type: 'home' | 'activity';
  sort: number;
  status: 'active' | 'inactive';
  startTime?: string;
  endTime?: string;
  createdAt: string;
  updatedAt: string;
}

// 系统配置类型定义
export interface SystemConfig {
  id: string;
  group: 'basic' | 'payment' | 'sms' | 'email' | 'security';
  key: string;
  value: string;
  description: string;
  type: 'text' | 'number' | 'boolean' | 'json' | 'date';
  sort: number;
  createdAt: string;
  updatedAt: string;
}

// 分页响应类型
export interface PaginationResponse<T> {
  list: T[];
  total: number;
  page: number;
  pageSize: number;
  totalPages: number;
}

// 通用响应类型
export interface ApiResponse<T = any> {
  code: number;
  message: string;
  data: T;
}

// 路由元数据类型
export interface RouteMeta {
  title: string;
  icon?: string;
  roles?: string[];
  permissions?: string[];
  hidden?: boolean;
  breadcrumb?: boolean;
  activeMenu?: string;
  cache?: boolean;
  affix?: boolean;
}

// 登录表单类型
export interface LoginForm {
  username: string;
  password: string;
  captcha?: string;
  remember?: boolean;
} 